﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FortuneHeaven.Admin.Common;
using FortuneHeavenBAL;
using FortuneHeavenCommon.DataMap;

namespace FortuneHeaven.Admin.Pages.Spread
{
    public partial class NetBarDetail : FortuneHeaven.Admin.Common.PageBase
    {
        public override string PageID
        {
            get { return "F31"; }
        }
        private string pre = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (ID >= 0)
                {
                    NetBarBO bo = new NetBarBO();
                    NetBarInfo g = bo.GetInfo(ID);
                    this.txtBarName.Text = g.BarName;
                    this.txtAddress.Text = g.Address;
                    this.txtBoss.Text = g.Name;
                    this.txtCity.Text = g.City;
                    this.txtMobile.Text = g.MobileNumber;
                    this.txtPhone.Text = g.Telephone;
                    this.txtProvince.Text = g.Province;
                }
            }
        }

        public new int? ID
        {
            get
            {
                return string.IsNullOrEmpty(Request["ID"]) ? -1 : int.Parse(Request["ID"]);
            }
        }

        public string Pre
        {
            get
            {
                if (!string.IsNullOrEmpty(pre))
                    return pre;
                else
                    pre = Server.UrlDecode(Request["pre"]);
                return pre;
            }
        }

       
        public void CancelSave(object sender, EventArgs arg)
        {
            Response.Redirect(Pre);
        }
    }
}